package com.example.rbacmanage.controller.app;

import com.example.rbacmanage.common.Result;
import com.example.rbacmanage.entity.app.Uv;
import com.example.rbacmanage.service.app.UvService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/app/uv")
public class AppUvController {
    @Autowired
    private UvService uvService;

    /**
     * 同一个IP和sessionId一天只保存一次
     * @param uv
     * @return
     */
    @PostMapping("/add")
    public Result add( @RequestBody Uv uv){
        uvService.save(uv);
        return Result.success();
    }
}
